package com.hc.service.impl;

import com.hc.entity.Role;
import com.hc.mapper.RoleMapper;
import com.hc.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class RoleServiceImpl implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public List<Role> getRolesByUserId(Integer userId) {
        return roleMapper.selectRolesByUserId(userId);
    }
}
